package il.ac.bgu.cs.heuristics.utils;

import junit.framework.Assert;
import junit.framework.TestCase;

import org.junit.Test;

/**
 * 
 * @author Ronen Pinko
 * 
 */
public class UtilTests extends TestCase{

	@Test
	public void testVariableName01() {
		try {
			Validation.ensureVariableNameConforms("bobo");
		} catch (IllegalArgumentException e) {
			Assert.fail();
		}
	}

	@Test
	public void testVariableName02() {
		try {
			Validation.ensureVariableNameConforms("bobo ");
			Assert.fail();
		} catch (IllegalArgumentException e) { // NOPMD empty try catch blocks
			// do nothing
		}
	}

	@Test
	public void testVariableName03() {
		try {
			Validation.ensureVariableNameConforms(" bobo");
			Assert.fail();
		} catch (IllegalArgumentException e) { // NOPMD empty try catch blocks
			// do nothing
		}
	}

	@Test
	public void testVariableName04() {
		try {
			Validation.ensureVariableNameConforms("6bobo");
			Assert.fail();
		} catch (IllegalArgumentException e) { // NOPMD empty try catch blocks
			// do nothing
		}
	}

	@Test
	public void testVariableName05() {
		try {
			Validation.ensureVariableNameConforms("Bobo5");
		} catch (IllegalArgumentException e) { // NOPMD empty try catch blocks
			Assert.fail();
		}
	}

	@Test
	public void testVariableName06() {
		try {
			Validation.ensureVariableNameConforms("_Bobo5");
		} catch (IllegalArgumentException e) { // NOPMD empty try catch blocks
			Assert.fail();
		}
	}

	@Test
	public void testVariableName07() {
		try {
			Validation.ensureVariableNameConforms("");
			Assert.fail();
		} catch (IllegalArgumentException e) { // NOPMD empty try catch blocks
			// do nothing
		}
	}

	@Test
	public void testVariableName08() {
		try {
			Validation.ensureVariableNameConforms(null);
			Assert.fail();
		} catch (IllegalArgumentException e) { // NOPMD empty try catch blocks
			// do nothing
		}
	}

	@Test
	public void testVariableName09() {
		try {
			Validation.ensureVariableNameConforms("on-floor");
		} catch (IllegalArgumentException e) { // NOPMD empty try catch blocks
			Assert.fail();
		}
	}

	@Test
	public void testVariableName10() {
		try {
			Validation.ensureVariableNameConforms("on-fl*oor");
			Assert.fail();
		} catch (IllegalArgumentException e) { // NOPMD empty try catch blocks
			// do nothing
		}
	}

}
